// 确认
export function confirm(title = '请确认', content = '') {
  return new Promise((resolve, reject) => {
    wx.showModal({
      title,
      content,
      success(res) {
        if (res.confirm) {
          resolve()
        } else {
          reject(res)
        }
      }
    })
  })
}

// 提示错误
export function showErr(title) {
  if (title) {
    wx.showToast({
      title,
      icon: 'loading'
    })
  }
}

export function toast(title) {
  wx.showToast({
    title,
    icon: 'loading'
  })
}
